export function formateTime(time: number) {
    if (!time) return ''
    let data = new Date(time);
    let year: string | number = data.getFullYear();
    let month: string | number = data.getMonth();
    let day: string | number = data.getDate();
    let hour: string | number = data.getHours();
    let minute: string | number = data.getMinutes();
    let seconds: string | number = data.getSeconds();
    month = month < 10 ? '0' + month : month;
    day = day < 10 ? '0' + day : day;
    hour = hour < 10 ? '0' + hour : hour;
    minute = minute < 10 ? '0' + minute : minute;
    seconds = seconds < 10 ? '0' + seconds : seconds;
    return year + "-" + month + "-" + day + " " + hour + ":"  + minute + ":" + seconds 
}
export function formateDate(time: number) {
    if (!time) return ''
    let data = new Date(time);
    let year: string | number = data.getFullYear();
    let month: string | number = data.getMonth();
    let day: string | number = data.getDate();
    
    month = month > 9 ? '0' + month : month;
    day = day > 9 ? '0' + day : day;
   
    return year + "-" + month + "-" + day 
}